<?php
/**
 * Created by PhpStorm.
 * User: xiaoqi
 * Date: 18-9-19
 * Time: 下午2:16
 */

namespace App\Model;


class Permission extends Model
{
    protected $table = 'permissions';

    /**
     * 不可被批量赋值的属性。
     *
     * @var array
     */
    protected $guarded = [];

    /**
     * 获得此权限下的角色。
     */
    public function roles()
    {
        return $this->belongsToMany('App\Model\Role');
    }
}